<!DOCTYPE html>
<html lang="en">

<head>
    <title>html5</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>


<body>
    <div id="site"></div>
    <script>
        if (typeof (Storage) !== "undefined") {
            localStorage.sitename = "html5";
            document.getElementById("site").innerHTML = localStorage.sitename;
        } else {
            // 抱歉! 不支持 web 存储。

        }
    </script>
</body>

</html>